module.exports = app => {
    const { router, controller, middleware } = app;
    // controller.文件名.方法名
    router.get('/blog/list', middleware.auth(), controller.blog.getBlog);
    router.post('/blog/list', middleware.auth(), controller.blog.addBlog);
    router.put('/blog/list', middleware.auth(), controller.blog.editBlog);
    router.delete('/blog/list/:id', middleware.auth(), controller.blog.delBlog);
    // 登录
    router.post('/login', controller.user.login);
    // 注册
    router.post('/register', controller.user.register);
};
